﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace Qreed.Drawing.Drawing2D
{
    public class LineSegment2DOld
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="LineSegment2D"/> class.
        /// </summary>
        /// <param name="polygon">The polygon.</param>
        public LineSegment2DOld(Polygon2DOld polygon, PointF[] vertices)
        {
            _polygon = polygon;
            _vertices = vertices;
        }

        private PointF[] _vertices;
        /// <summary>
        /// Gets the <see cref="System.Drawing.PointF"/> at the specified index.
        /// </summary>
        /// <value></value>
        public PointF this[int index]
        {
            get { return _vertices[index];}
        }

        /// <summary>
        /// Gets the count.
        /// </summary>
        /// <value>The count.</value>
        public int Count
        {
            get { return _vertices.Length; }
        }

        private Polygon2DOld _polygon;
        /// <summary>
        /// Gets the polygon.
        /// </summary>
        /// <value>The polygon.</value>
        public Polygon2DOld Polygon
        {
            get { return this._polygon; }
        }   
    }
}
